import type { RouteRecordRaw } from 'vue-router';
import { $t } from '@/locales';

function Layout() {
  return import('@/layouts/index.vue');
}

const routes: RouteRecordRaw = {
  path: '/engineer_certification',
  component: Layout,
  redirect: '/engineer_certification/index',
  name: 'engineer_certification',
  meta: {
    title: '研发工程师认证管理',
    icon: 'icon_engineer',
  },
  children: [
    {
      path: 'index',
      name: 'engineerCertificationIndex',
      component: () => import('@/views/dcp/enginee_certification/index.vue'),
      meta: {
        title: '考情发布',
        singleMenu: true,
        i18n: $t('route.dcp.managementPlatform.engineerCertification_examSituationRelease'),
        activeIcon: 'system-point',
        auth: 'engineer_certification_index',
      },
    }, {
      path: 'index/exam_details',
      name: 'engineerCertificationExamDetails',
      component: () => import('@/views/dcp/enginee_certification/components/exam_details.vue'),
      meta: {
        title: '报考信息',
        sidebar: false,
        activeMenu: '/engineer_certification/index',
        auth: 'engineer_certification_index_details',
      },
    }, {
      path: 'details',
      name: 'engineerCertificationDetails',
      component: () => import('@/views/dcp/enginee_certification/details.vue'),
      meta: {
        title: '研发人员明细',
        singleMenu: true,
        i18n: $t('route.dcp.managementPlatform.engineerCertification_details'),
        activeIcon: 'system-point',
        auth: 'engineer_certification_details',
      },
    }, {
      path: 'workingHours',
      name: 'engineerCertificationWorkingHours',
      component: () => import('@/views/dcp/enginee_certification/workingHours.vue'),
      meta: {
        title: '研发人员工时',
        singleMenu: true,
        i18n: $t('route.dcp.managementPlatform.engineerCertification_workingHours'),
        activeIcon: 'system-point',
        auth: 'engineer_certification_workingHours',
      },
    }, {
      path: 'largeScreen',
      name: 'engineerCertificationLargeScreen',
      component: () => import('@/views/dcp/enginee_certification/largeScreen.vue'),
      meta: {
        title: '研发人员情况大屏',
        singleMenu: true,
        i18n: $t('route.dcp.managementPlatform.engineerCertification_largeScreen'),
        activeIcon: 'system-point',
        auth: 'engineer_certification_largeScreen',
      },
    },
    {
      path: 'largeScreen/details',
      name: 'engineerCertificationLargeScreenDetails',
      component: () => import('@/views/dcp/enginee_certification/largeScreenDetails.vue'),
      meta: {
        title: '认证情况详情',
        sidebar: false,
        activeMenu: '/engineer_certification/largeScreen',
        auth: 'engineer_certification_largeScreen_details',
      },
    },
  ],
};

export default routes;
